package cn.domain;

import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

public class TbProduct {
    private Integer id;
    
    private String name;

    private BigDecimal price;
    
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date producetime;

    private String madefactory;

    public TbProduct() {
		super();
	}

	public TbProduct(String name, BigDecimal price, Date producetime, String madefactory) {
		super();
		this.id=-1;
		this.name = name;
		this.price = price;
		this.producetime = producetime;
		this.madefactory = madefactory;
	}

	public TbProduct(Integer id, String name, BigDecimal price, Date producetime, String madefactory) {
		super();
		this.id = id;
		this.name = name;
		this.price = price;
		this.producetime = producetime;
		this.madefactory = madefactory;
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Date getProducetime() {
        return producetime;
    }

    public void setProducetime(Date producetime) {
        this.producetime = producetime;
    }

    public String getMadefactory() {
        return madefactory;
    }

    public void setMadefactory(String madefactory) {
        this.madefactory = madefactory == null ? null : madefactory.trim();
    }

	public String toString() {
		return "TbProduct [id=" + id + ", name=" + name + ", price=" + price + ", producetime=" + producetime
				+ ", madefactory=" + madefactory + "]";
	}
}